<?php

namespace app\adminapi\model\log;

use app\common\model\BaseModel;
use app\common\traits\OperatorTrait;
use think\model\concern\SoftDelete;

class SysOperLogDO extends BaseModel
{
    protected $autoWriteTimestamp = false;

    protected $name = 'oper_log';
    protected $table = 'sys_oper_log';
    protected $pk = 'oper_id';

    // 时间格式
    protected $dateFormat = 'Y-m-d H:i:s';

    protected $type = [
        'oper_time' => 'datetime'
    ];

    protected $schema = [
        'oper_id' => 'int',
        'title' => 'string',
        'oper_type' => 'int',
        'method' => 'string',
        'req_method' => 'string',
        'oper_name' => 'string',
        'oper_url' => 'string',
        'oper_ip' => 'string',
        'oper_location' => 'string',
        'req_param' => 'string',
        'rep_param' => 'string',
        'status' => 'int',
        'error_msg' => 'string',
        'oper_time' => 'datetime',
        'cost_time' => 'in'
    ];
}